package com.lagou.service;

import com.lagou.dao.BlogIndexDao;
import com.lagou.pojo.BlogInfo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class BlogIndexService {

    @Autowired
    private BlogIndexDao blogIndexDao;

    public List<BlogInfo> getBlogInfo() {
        List<BlogInfo> blogInfos = new ArrayList<>();
        try{
            blogInfos = blogIndexDao.getBlogInfo();
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
        return blogInfos;
    }
}
